<!--#include file="common/header.html"-->
<body>
    <div class="container-fluid larry-wrapper">
        <div class="row">
            <div class="col-xs-12 col-sm-12 col-md-12">
                <!--头部搜索-->
                <section class="panel panel-padding">
                    <form class="layui-form" action="/education/admin/userCoupon">
                        <input type="hidden" name="_query.couponId" id="queryCouponId">
                        <div class="layui-form">
                            <div class="layui-inline">
                                <div class="layui-input-inline">
                                    <input class="layui-input" name="_query.keyword" placeholder="关键字">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <button lay-submit class="layui-btn" lay-filter="search" id="search">查找</button>
                            </div>
                        </div>
                    </form>
                </section>

                <!--列表-->
                <section class="panel panel-padding">
                    <div class="group-button">
                        <!--<button class="layui-btn layui-btn-small modal-catch"
                                data-params='{"content":".add-subcat", "title":"添加","type":"1", "full":"true", "maxmin":"true"}'>
                            <i class="iconfont">&#xe649;</i> 添加
                        </button>-->
                        <!--<button class="layui-btn layui-btn-small layui-btn-danger ajax-all" data-name="checkbox" data-params='{"url": "/education/admin/userCoupon/delete"}'>
                            <i class="iconfont">&#xe626;</i> 删除
                        </button>-->
                    </div>
                    <div id="list" class="layui-form"></div>

                    <div class="text-right" id="page"></div>
                </section>
            </div>
        </div>
    </div>

</body>
<script id="list-tpl" type="text/html"
        data-params='{"url":"/education/admin/userCoupon","dataName":"userCouponData","pageid":"#page", "method":"post"}'>
    <table id="example" class="layui-table lay-even" data-name="userCouponData" data-tplid="list-tpl">
        <thead>
        <tr>
            <th width="30"><input type="checkbox" id="checkall" data-name="checkbox" lay-filter="check"
                                  lay-skin="primary"></th>
            <th>用户名</th>
            <th>手机号</th>
            <th>是否已使用</th>
            <th width="170">领取时间</th>
            <!--<th width="200">操作</th>-->
        </tr>
        </thead>
        <tbody>
        {{# layui.each(d.list, function(index, item){ }}
        <tr>
            <td><input type="checkbox" name="checkbox" value="{{ item.id}}" lay-skin="primary"></td>
            <td>{{ item.username || '' }}</td>
            <td>{{ item.mobile || ''}}</td>
            <td>
                {{#if (item.status == 1){ }} 是 {{# } else { }} 否 {{# } }}
            </td>
            <td>{{# if(item.create_time == null){ }} {{#  } else { }} {{ item.create_time}}  {{#  } }}</td>
            <!--<td>
                <button class="layui-btn layui-btn-mini layui-btn-danger ajax"
                        data-list='{"key":"id={{ item.id}}","msg":true,"render":"true","action":"del"}'
                        data-params='{"url": "/education/admin/userCoupon/delete/{{item.id}}","data":"", "method":"post", "confirm":"true"}'>
                    <i class="iconfont">&#xe626;</i>删除
                </button></td>
            </td>-->
        </tr>
        {{# }); }}
        </tbody>

    </table>
</script>
<script src="../js/layui/layui.js"></script>
<script type="text/javascript" src="../js/lib/jquery-1.11.2.min.js"></script>
<script type="text/javascript" src="../js/lib/rest.js"></script>
<script type="text/javascript" src="../../jsfile/jquery/jquery.form.js"></script>
<!--#include file="common/version.html"-->
<script>
    layui.use('user_list');
    function initData(){
        $v = '{"url":"/education/admin/userCoupon?_query.couponId='+ getQueryString('ids')
            +'","dataName":"userCouponData","pageid":"#page", "method":"post", "data":"orderColunm=a.create_time&orderMode=desc"}';
        $("#list-tpl").attr('data-params', $v);
        $('#queryCouponId').val(getQueryString('ids'));

    }
</script>

</html>